let sm2 = require('./sm2/index.js')
try{
    dsf.SM2 = {
        doEncrypt: function (data, publicKey) {
            return sm2.doEncrypt(data, publicKey,1)
        },
        doDecrypt: function (data, privateKey) {
            return sm2.doDecrypt(data, privateKey,1)
        }
    };
}catch (e) {
}

// 私钥：de60bccc2200b014049eee37b92e61bf47148e05cc06549e46d8c9140b27df2b
// 公钥：043c68bf1d1c09d61bf714982ad395229fbe86938ffa4b2b1c0bb3dabec3abe42589b826253830d28ed6225307f8de82ed5abc64386f86d4f4240a7e920b2cc31b
let mm = sm2.doEncrypt('123', '043c68bf1d1c09d61bf714982ad395229fbe86938ffa4b2b1c0bb3dabec3abe42589b826253830d28ed6225307f8de82ed5abc64386f86d4f4240a7e920b2cc31b',1)
let mw = sm2.doDecrypt(mm,'de60bccc2200b014049eee37b92e61bf47148e05cc06549e46d8c9140b27df2b',1)
console.log(mm,mw)